翻訳と辞書
Words near each other
・ Single of the Weak
・ Single of the Year
・ Single operator two radios
・ Single parent
・ Single particle analysis
・ Single particle tracking
・ Single Payment Scheme
・ Single peaked preferences
・ Single person
・ Single Piece Flow
・ Single point (disambiguation)
・ Single point of failure
・ Single pot still whiskey
・ Single Princesses and Blind Dates
・ Single Resolution Mechanism
Single responsibility principle
・ Single rider
・ Single Room Furnished
・ Single room occupancy
・ Single rope technique
・ Single Santa Seeks Mrs. Claus
・ Single scan dynamic molecular imaging technique
・ Single Scope Background Investigation
・ Single screen (game perspective)
・ Single scull
・ Single set back
・ Single sexed
・ Single sexes
・ Single sexing
・ Single ship


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Single responsibility principle : ウィキペディア英語版
Single responsibility principle

In object-oriented programming, the single responsibility principle states that every class should have responsibility over a single part of the functionality provided by the software, and that responsibility should be entirely encapsulated by the class. All its services should be narrowly aligned with that responsibility.
The term was introduced by Robert C. Martin in an article by the same name as part of his ''Principles of Object Oriented Design'',〔http://www.butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod〕 made popular by his book ''Agile Software Development, Principles, Patterns, and Practices''. Martin described it as being based on the principle of cohesion, as described by Tom DeMarco in his book ''Structured Analysis and Systems Specification''.
Martin defines a responsibility as a ''reason to change'', and concludes that a class or module should have one, and only one, reason to change. As an example, consider a module that compiles and prints a report. Imagine such a module can be changed for two reasons. First, the content of the report could change. Second, the format of the report could change. These two things change for very different causes; one substantive, and one cosmetic. The single responsibility principle says that these two aspects of the problem are really two separate responsibilities, and should therefore be in separate classes or modules. It would be a bad design to couple two things that change for different reasons at different times.
The reason it is important to keep a class focused on a single concern is that it makes the class more robust. Continuing with the foregoing example, if there is a change to the report compilation process, there is greater danger that the printing code will break if it is part of the same class.
The responsibility is defined as ''a charge assigned to a unique actor to signify its accountabilities concerning a unique business task''.
==See also==

* Separation of concerns
* Chain-of-responsibility pattern
* Cohesion (computer science)
* Open/closed principle
* SOLID - the "S" in "SOLID" stands for the single responsibility principle

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Single responsibility principle」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.